package com.lsh.oms.core.enums;

/**
 * Project Name: StrategyRequestAttrType
 * 北京链商电子商务有限公司
 *
 * @author wangliutao
 * Date: 19/1/14
 * Package Name: com.lsh.atp.core.enums
 * Description:
 */
public enum StrategyRequestAttrType {

    ZONE_CODE(1, "区域"),

    RAIL(2, "围栏"),

    USER_TYPE(3, "用户类型"),

    SUPPLY_ORG(4, "机构"),

    SUPPLY_MARKET(5, "供商"),

    DC(6, "仓库"),

    STORAGE_TYPE(7, "订单存储类型（常温、冻品）"),

    USER_GROUP(8, "用户组"),

    WEIGHT(9, "重量"),

    DISTANCE(10, "距离"),

    USER_ID(13, "用户ID"),
    SUPPLIER_GROUP(22, "履约用户组"),;

    private Integer code;
    private String desc;

    StrategyRequestAttrType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static StrategyRequestAttrType valueOf(Integer code) {
        for (StrategyRequestAttrType type : values()) {
            if (type.code.equals(code)) {
                return type;
            }
        }

        return null;
    }
}
